<?php
include($_SERVER['DOCUMENT_ROOT'] . "/admin/includes/interceptor.php");
require_once $_SERVER['DOCUMENT_ROOT'] . '/autoload.php';

use Qiniu\Auth;
use Qiniu\Storage\BucketManager;

$accessKey = 'Vr2infZAJEsN8MVWW-KRaFDtyvKbW7YEPIOcudlL';
$secretKey = '-k0wf3uG7kyQIeyRm0OD0VSC3WUK-upZtk7U59tu';
$bucket = 'softwarebox';

@$in_key = $_GET['key'];

$key = $in_key;
$auth = new Auth($accessKey, $secretKey);
$config = new \Qiniu\Config();
$bucketManager = new BucketManager($auth, $config);
$err = $bucketManager->delete($bucket, $key);
if ($err) {//['statusCode'] . ':' . $err['error']
    var_dump($err);
} else {
    echo '000000';
}
